package cn.st4rlight.util.id;

import java.util.List;

import com.google.common.collect.Lists;

/**
 * @author st4rlight <st4rlight@163.com>
 * Created on 2025-05-02
 */
public interface IGetID {

    /**
     * 生成单个id
     */
    long getId();

    /**
     * 批量生成id
     */
    default List<Long> batchGetId(int count) {
        List<Long> resultList = Lists.newArrayList();
        for (int i = 0; i < count; i++) {
            resultList.add(this.getId());
        }
        return resultList;
    }
}
